//
//  CCurrentAccountMgr.m
//  wanzhaoIM
//
//  Created by liuyuantao on 15/4/17.
//  Copyright (c) 2015年 liuyuantao. All rights reserved.
//

#import "CCurrentAccountMgr.h"
#import "CAccountModel.h"
#import "CAccountMgr.h"
@interface CCurrentAccountMgr()
{
    
    
}
@property(nonatomic, strong)CAccountModel *currentAccount;

@end

@implementation CCurrentAccountMgr

+(CCurrentAccountMgr *)shareInstance
{
    static CCurrentAccountMgr *instance = nil;
    static dispatch_once_t predicate = 0;
    dispatch_once(&predicate, ^{
        instance = [[CCurrentAccountMgr alloc] init];
    });
    return instance;
}

-(id)init
{
    self = [super init];
    if(self)
    {
        self.currentAccount = nil;
    }
    return self;
}

-(void)updateCurrentAccount
{
    CAccountMgr *accMgr = [[CAccountMgr alloc] init];
    CAccountModel *account = [accMgr getRecentlyLoginAccount];
    self.currentAccount = account;
}

-(CAccountModel *)getCurrentAccount
{
    return _currentAccount;
}

@end
